#include <iostream>
#include "Person.h"
#include "Student.h"

using namespace std;

// An example of an ABC - Abstract Base Class
class ABC
{
public:
	virtual void DoSomething() = 0;
};

void ABC::DoSomething( void )
{
	cout << "Base class doing something!!!" << endl;
}

class Derived : public ABC
{
public:

	virtual void DoSomething( void ) {
		ABC::DoSomething(); 
		cout << "Doing something!!!" << endl; 
	}
};

int main( void )
{

	if (1)
	{
		Person person( "Me", 654 );
		//person.Show();
		cout << person;
	}

	if ( 1 )
	{
		Student student( "Bryua", 23, 95);

		//student.Show();
		cout << student;
	}

	// Person pointers can handle students since Student "is-a" Person
	if (1 )
	{
		Person *p = new Student( "John", 55, 60 );
		p->Show(); // Calls Student::Show()
		cout << endl;
		delete p;
		p = new Person( "New person", 55 );
		p->Show(); // calls Person::Show()
		delete p;
	}

	if (1 )
	{
		Derived derived;
		derived.DoSomething();
	}

	// some comment stuffs
	// Imagine really kewl code here...

	// More code here addded by Puyih
	// Also adding some comment code by Mark

	return 0;
}